]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
realmd: Set login format to null on start and update if invalid
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 23 May 2019 04:12:56 +0000 (06:12 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 9 Sep 2019 19:28:18 +0000 (19:28 +0000)
We were checking an undefined property but that would lead to a a warning.
Instead we can consider the login format unset until is null, and in case
update it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700

js/gdm/realmd.js

index 913fdd3befe01166c4dd8d1dd1fcebe3a0febcd2..758496820982e971d25479824c623e35ecea3f34 100644 (file)
@@ -21,6 +21,7 @@ var Manager = class {
                                            '/org/freedesktop/realmd',
                                            this._reloadRealms.bind(this));
         this._realms = {};
+        this._loginFormat = null;
 
         this._signalId = this._aggregateProvider.connect('g-properties-changed',
             (proxy, properties) => {
@@ -86,7 +87,7 @@ var Manager = class {
     }
 
     get loginFormat() {
-        if (this._loginFormat !== undefined)
+        if (this._loginFormat)
             return this._loginFormat;
 
         this._updateLoginFormat();